Conditions | 2 |
Total Lines | 13 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { |
||
26 | |||
27 | @Post(':id') |
||
28 | @WithName('faircalendar_event_delete') |
||
29 | public async post( |
||
30 | @Param() dto: IdDTO, |
||
31 | @LoggedUser() user: User, |
||
32 | @Res() res: Response |
||
33 | ) { |
||
34 | try { |
||
35 | await this.commandBus.execute(new DeleteEventCommand(dto.id, user)); |
||
36 | res.redirect(303, '/app/faircalendar'); |
||
37 | } catch (e) { |
||
38 | throw new BadRequestException(e.message); |
||
39 | } |
||
42 |